import request from '@/utils/request'
// 获取权限组列表
export const limitListAPI = (query) => {
  return request({
    method: 'get',
    url: '/permissions',
    query
  })
}
// 删除权限组列表
export const delLimitAPI = (id) => {
  return request({
    method: 'delete',
    url: `/permissions/${id}`
  })
}
// 权限组详情
export const limitDetail = (id) => {
  return request({
    method: 'get',
    url: `/permissions/${id}`,
    params: {
      id
    }

  })
}
// 权限组修改
export const limitEditAPI = (id, title, permissions) => {
  return request({
    method: 'put',
    url: `/permissions/${id}`,
    data: {
      id, title, permissions
    }

  })
}
// 权限组添加
export const limitAddAPI = (id, permissions) => {
  return request({
    method: 'post',
    url: '/permissions',
    data: {
      permissions,
      id
    }
  })
}
